package com.ruoyi.business.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 订单列表对象 t_order_info
 * 
 * @author ruoyi
 * @date 2024-02-26
 */
@Data
@JsonInclude(JsonInclude.Include.NON_NULL)
public class TOrderInfo extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /**  */
    private Long id;

    /** 用户id */
    @Excel(name = "用户id")
    private Long userId;

    private String userName;

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    /** 通道编码 */
    @Excel(name = "通道编码")
    private String channel;

    /** 通道类型。alipay/wechat/unionpay */
    @Excel(name = "通道类型。alipay/wechat/unionpay")
    private String channelType;

    /** 支付通道账号 */
    @Excel(name = "支付通道账号")
    private String channelAccount;

    /** 平台收款账户ID */
    @Excel(name = "平台收款账户ID")
    private Long recipientId;

    /** 支付宝authcode */
    @Excel(name = "支付宝authcode")
    private String aliAuthCode;

    /** 经度 */
    @Excel(name = "经度")
    private String longitude;

    /** 维度 */
    @Excel(name = "维度")
    private String latitude;

    /** 付款者支付宝ID */
    @Excel(name = "付款者支付宝ID")
    private String aliUserId;

    /** 收款号所有者的uid */
    @Excel(name = "收款号所有者的uid")
    private Long recipientUid;

    private String recipientUName;

    public String getRecipientUName() {
        return recipientUName;
    }

    public void setRecipientUName(String recipientUName) {
        this.recipientUName = recipientUName;
    }

    /** 收款号实名 */
    @Excel(name = "收款号实名")
    private String recipientRealName;

    /** 订单金额 */
    @Excel(name = "订单金额")
    private Long money;

    /** 用户实际支付金额。单位分（用于固定二维码随机立减通道） */
    @Excel(name = "用户实际支付金额。单位分", readConverterExp = "用=于固定二维码随机立减通道")
    private Long realMoney;

    /** 到账金额。单位分 */
    @Excel(name = "到账金额。单位分")
    private Long receiptMoney;

    /** 商户自己的唯一订单号 */
    @Excel(name = "商户自己的唯一订单号")
    private String outTradeNo;

    /** 商户下单传的附加信息。 */
    @Excel(name = "商户下单传的附加信息。")
    private String outBody;

    /** 商户自己用户的id */
    @Excel(name = "商户自己用户的id")
    private String outUserId;

    /** 商品名称 */
    @Excel(name = "商品名称")
    private String goodsName;

    /** 支付成功异步通知地址 */
    @Excel(name = "支付成功异步通知地址")
    private String notifyUrl;

    /** 支付成功后跳转的商户url */
    @Excel(name = "支付成功后跳转的商户url")
    private String returnUrl;

    /** 订单状态：0待生成支付url，1待支付，2支付成功，3订单超时 */
    @Excel(name = "订单状态：0待生成支付url，1待支付，2支付成功，3订单超时")
    private Integer status;

    /** 支付二维码文本 */
    @Excel(name = "支付二维码文本")
    private String qrcodeTxt;

    /** 二维码图片真正内容 */
    @Excel(name = "二维码图片真正内容")
    private String qrcodeContent;

    /** 支付二维码图片地址 */
    @Excel(name = "支付二维码图片地址")
    private String qrcodeUrl;

    /** 支付地址 */
    @Excel(name = "支付地址")
    private String payUrl;

    /** 二维码生成时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")

    @Excel(name = "二维码生成时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date qrcodeTime;

    /** 是否支付成功 */
    @Excel(name = "是否支付成功")
    private Integer paySucc;

    /** 支付成功时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "支付成功时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date paySuccTime;

    /** 三方支付通道订单id */
    @Excel(name = "三方支付通道订单id")
    private String pay3rdOrderNo;

    /** 回调通知是否成功 */
    @Excel(name = "回调通知是否成功")
    private Integer notifySucc;

    /** 回调成功通知时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "回调成功通知时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date notifySuccTime;

    /** 平台收取的费用。单位分 */
    @Excel(name = "平台收取的费用。单位分")
    private Long platformFee;

    /** 订单有效时间。超过该时间订单无效 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "订单有效时间。超过该时间订单无效", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date validTime;

    /** 订单请求ip */
    @Excel(name = "订单请求ip")
    private String orderIp;

    /** 通道支付结果消息 */
    @Excel(name = "通道支付结果消息")
    private String channelPayResult;

    /** 是否人工补单。默认0否 */
    @Excel(name = "是否人工补单。默认0否")
    private Integer manualSucc;

    /** 最近访问支付地址的ip */
    @Excel(name = "最近访问支付地址的ip")
    private String payurlLastseeIp;

    /** 生成付款二维码是否需要设置备注。 */
    @Excel(name = "生成付款二维码是否需要设置备注。")
    private Integer needSetMark;

    /** 结算类型。1-余额扣减。2-结算到余额 */
    @Excel(name = "结算类型。1-余额扣减。2-结算到余额")
    private Integer settleType;

    /** 下游订单号 */
    @Excel(name = "下游订单号")
    private String customOrderNo;

    /** 京东买手号 */
    @Excel(name = "京东买手号")
    private String jdBuyerId;

    /** 通道费率 */
    @Excel(name = "通道费率")
    private Integer channelRate;

    /**  */
    @Excel(name = "")
    private String bankName;

    /**  */
    @Excel(name = "")
    private String proxyIp;

    /**  */
    @Excel(name = "")
    private Long createUser;

    /**  */
    @Excel(name = "")
    private Long updateUser;

    private String googleCode;

    private String channelDesc;

    private String msgPayResult;

    private String timeType;

    private String qryType;

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .append("userId", getUserId())
            .append("channel", getChannel())
            .append("channelType", getChannelType())
            .append("channelAccount", getChannelAccount())
            .append("recipientId", getRecipientId())
            .append("aliAuthCode", getAliAuthCode())
            .append("longitude", getLongitude())
            .append("latitude", getLatitude())
            .append("aliUserId", getAliUserId())
            .append("recipientUid", getRecipientUid())
            .append("recipientRealName", getRecipientRealName())
            .append("money", getMoney())
            .append("realMoney", getRealMoney())
            .append("receiptMoney", getReceiptMoney())
            .append("outTradeNo", getOutTradeNo())
            .append("outBody", getOutBody())
            .append("outUserId", getOutUserId())
            .append("goodsName", getGoodsName())
            .append("notifyUrl", getNotifyUrl())
            .append("returnUrl", getReturnUrl())
            .append("status", getStatus())
            .append("qrcodeTxt", getQrcodeTxt())
            .append("qrcodeContent", getQrcodeContent())
            .append("qrcodeUrl", getQrcodeUrl())
            .append("payUrl", getPayUrl())
            .append("qrcodeTime", getQrcodeTime())
            .append("paySucc", getPaySucc())
            .append("paySuccTime", getPaySuccTime())
            .append("pay3rdOrderNo", getPay3rdOrderNo())
            .append("notifySucc", getNotifySucc())
            .append("notifySuccTime", getNotifySuccTime())
            .append("platformFee", getPlatformFee())
            .append("validTime", getValidTime())
            .append("orderIp", getOrderIp())
            .append("channelPayResult", getChannelPayResult())
            .append("manualSucc", getManualSucc())
            .append("payurlLastseeIp", getPayurlLastseeIp())
            .append("needSetMark", getNeedSetMark())
            .append("settleType", getSettleType())
            .append("customOrderNo", getCustomOrderNo())
            .append("jdBuyerId", getJdBuyerId())
            .append("channelRate", getChannelRate())
            .append("bankName", getBankName())
            .append("proxyIp", getProxyIp())
            .append("createUser", getCreateUser())
            .append("updateUser", getUpdateUser())
            .toString();
    }
}
